<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Output all remaining data on a gz-file pointer</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.gzpassthru" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">gzpassthru</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">gzpassthru</span> &mdash; <span class="dc-title">
   Output all remaining data on a gz-file pointer
  </span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.gzpassthru-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>gzpassthru</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$zp</code></span>
   ) : <span class="type">int</span></div>

  <p class="para rdfs-comment">
   Reads to <acronym title="End Of File">EOF</acronym> on the given gz-file pointer from the current position and
   writes the (uncompressed) results to standard output.
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    You may need to call <span class="function"><a href="gzrewind.html" class="function">gzrewind()</a></span> to reset the file
    pointer to the beginning of the file if you have already written data 
    to it. 
   </p>
  </p></blockquote>
  <div class="tip"><strong class="tip">Tip</strong>
   <p class="para">
    If you just want to dump the contents of a file to the output buffer, 
    without first modifying it or seeking to a particular offset, you may 
    want to use the <span class="function"><a href="readgzfile.html" class="function">readgzfile()</a></span> function, which saves 
    you the <span class="function"><a href="gzopen.html" class="function">gzopen()</a></span> call.
   </p>
  </div>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.gzpassthru-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">zp</code></dt>

     <dd>

      <p class="para">
       The gz-file pointer. It must be valid, and must point to a file
       successfully opened by <span class="function"><a href="gzopen.html" class="function">gzopen()</a></span>.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.gzpassthru-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   The number of uncompressed characters read from <code class="parameter">gz</code>
   and passed through to the input, or <strong><code>FALSE</code></strong> on error.
  </p>
 </div>

 <div class="refsect1 examples" id="refsect1-function.gzpassthru-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-879">
    <p><strong>Example #1 <span class="function"><strong>gzpassthru()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$fp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">gzopen</span><span style="color: #007700">(</span><span style="color: #DD0000">'file.gz'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'r'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">gzpassthru</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">gzclose</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
    </div>

   </div>
  </p>
 </div>

</div></div></div></body></html>